<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			img{
				width: 200px;
				height: 130px;
				padding: 10px 20px;
			}
			.box{
				height: 180px;
				background-color: rgba(246,246,246,0.2);
			}
			.inbox1,.inbox2,.inbox3,.inbox4,.inbox5{
				float: left;
			}
			.box1{
				width: 1200px;
				height: 180px;
				margin: 0 auto;
			}
			body{
				background: url(img/1.jpg) no-repeat;
			}
		</style>
	</head>
	<body >
		<div class="box">
			<div class="box1">
			<div class="inbox1"> <img src="img/1.jpg"></div>
			<div class="inbox2"> <img src="img/2.jpg"></div>
			<div class="inbox3"> <img src="img/3.jpg"></div>
			<div class="inbox4"> <img src="img/4.jpg"></div>
			<div class="inbox5"> <img src="img/5.jpg"></div>
		</div></div>
		<script>
			var image = document.getElementsByTagName("img");
			var bo = document.body;
			for(var i =0;i < image.length;i++)
			{
				image[i].onclick = function(){
					 bo.style.backgroundImage = "url("+this.src+")";
				}
			}
		</script>
	</body>
</html>
